//
//  PickerButton.m
//  HappyTravel
//
//  Created by JiePan’s Mac on 2018/9/6.
//  Copyright © 2018年 Apple. All rights reserved.
//

#import "PickerButton.h"

@implementation PickerButton

#pragma mark - init
- (id)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super initWithCoder:aDecoder]) {
        [self backOrigin];
    }
    return self;
}

- (id)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        [self backOrigin];
        self.isSelect = NO;
    }
    return self;
}

- (void)setIsSelect:(BOOL)isSelect {
    _isSelect = isSelect;
    if (_isSelect) {
        self.selected = YES;
    }else {
        self.selected = NO;
    }
}

- (void)setTitles:(NSString *)titles {
    [self setTitle:titles forState:UIControlStateNormal];
}

- (void)backOrigin{
    
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    self.titleLabel.font = [UIFont systemFontOfSize:13];
}






@end
